
@echo off  
:: BatchGotAdmin  
REM  --> 检查用户权限
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"  
  
REM --> If error flag set, we do not have admin.  
if '%errorLevel%' NEQ '0' (  
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"  
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"  
    "%temp%\getadmin.vbs"  
    del "%temp%\getadmin.vbs"  
    exit /B  
)  
  
:: Your batch commands here...

cd /d %~dp0   

call var.bat
for /L %%i in (%instance_start%,1,%instance_end%) do (   
	call function_removeService.bat  influx%%i 
)  
rmdir /S /Q %db_path%
rmdir /S /Q %db_backup_path%
pause